package model.system
{
	import core.Control;
	import core.Model;
	
	import global.GameState;

	public class TraceManager
	{
		private static var instance:TraceManager;
		private var _control:Control = Control.getInstance();
		
		public function TraceManager()
		{
			if (instance)
			{
				throw Error("单列 !");
			}
		}
		
		public static function getInstance():TraceManager
		{
			if (instance == null)instance = new TraceManager();
			return instance;
		}
		
		public function out(...args):void
		{
			
			if (GameState.traceType == 2)
			{
				var outString:String = "";
				for (var i:String in args)
				{
					outString += args[i] + "	";	
				}
				_control.debugPanelControl.output(outString);
			}
			else
			{
				//trace(outString);
			}
		}
	}
}